//
//  RDeliveryHitSubTaskTagsManager.h
//  RDelivery
//
//  Created by selmerzhang on 2022/2/17.
//  Copyright © 2022 Tencent. All rights reserved.
//

#ifndef RDeliveryHitSubTaskTagsManager_h
#define RDeliveryHitSubTaskTagsManager_h

#import "RDConfigServerJsonModel.h"
#import "RDeliveryPullConfigTask.h"
#import "RDeliverySDKSettings+Private.h"

/// bugly监控联动打标签的Key
FOUNDATION_EXPORT NSString * const kRDeliveryBuglyMonitorKey;

@interface RDeliveryHitSubTaskTagsManager : NSObject

//初始化
- (instancetype)initWithSettings:(RDeliverySDKSettings *)settings;

// 更新命中子任务标签信息
- (void)processHitSubTaskTagsWithResponse:(RDConfigServerPullResponse *)responseObject
                                     task:(RDeliveryPullConfigTask * )task;

// 上报给bugly的拼接好的标签字符串
+ (NSString *)tagsString;

/// 当前实例的标签
- (NSString *)getHitSubTaskTags;

/// 设置bugly标签，会以 | 为分隔符将标签拼成一个字符串
/// @param tagsArray 标签的数组
/// @param key 要打标签的业务key，不允许使用"RDelivery"，否则会覆盖监控联动的数据
+ (void)setupBuglyTags:(NSArray <NSString *>*)tagsArray key:(NSString *)key;

/// 设置 shiply 标签，会以 | 为分隔符将标签拼成一个字符串
/// @param subTaskId 子任务Id
- (void)updateHitSubTaskId:(int64_t)subTaskId;

@end

#endif /* RDeliveryHitSubTaskTagsManager_h */
